package com.jader.beans;

import java.io.Serializable;

public class Address implements Serializable {
	private static final long serialVersionUID = 1L;
	private int userid;
	private int addressid;
	private String province;
	private String city;
	private String area;
	private String detail;
	private String receiver;
	private String phone;

	public Address() {
		super();
	}

	public Address(int addressid, String province, String city, String area,
			String detail, int userid, String receiver, String phone) {
		super();
		this.addressid = addressid;
		this.province = province;
		this.city = city;
		this.area = area;
		this.detail = detail;
		this.receiver = receiver;
		this.phone = phone;
		this.userid = userid;
	}

	public int getAddressid() {
		return addressid;
	}

	public void setAddressid(int addressid) {
		this.addressid = addressid;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public int getUserid() {
		return userid;
	}

	public void setUserid(int userid) {
		this.userid = userid;
	}

	@Override
	public String toString() {
		return "Address [userid=" + userid + ", addressid=" + addressid
				+ ", province=" + province + ", city=" + city + ", area="
				+ area + ", detail=" + detail + ", receiver=" + receiver
				+ ", phone=" + phone + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + addressid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Address other = (Address) obj;
		if (addressid != other.addressid)
			return false;
		return true;
	}

}
